<?php
class Animal
{
  /*
   * while creating any object that function will call automatically
   * */
  public function __construct() {
    echo '<br>I am in constructor<br>';
    $this->created = time();
  }

  /*
  * Default destructor of any class, that will call automatically
  * */
  public function __destruct() {
    echo '<br>I am in destrructor in ANIMAL<br>';
    $this->created = '';
  }

}


/*
 * We will create object of that class ,
 * and due to absence of constructor/destructor in that class,
 * the parent  constructor/destructor of that class will be called
 * */
class Penguin extends Animal
{
  public $created = "vikas";
 // function penguin()
 // {
 //   echo "I am in penguin constructor--1";
 // }

  //function __construct()
  //{
  //  echo "I am in penguin constructor--2";
  //  $this->created = "prakash";
  //}
}

$obj = new Penguin;
//echo $obj->created;
